package LECONGHAU.LISTARRAY.BAI1;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class VIEWS {
public static void main(String[] args) {
	List<String> listStudent=new ArrayList<String>();
	List<String> listcopy=new ArrayList<String>();
	listStudent.add("le cong hau");
	listStudent.add("le cong hau2");
	listStudent.add("le cong hau3");
	listStudent.add("le cong hau1");
	for(int i=0;i<listStudent.size();i++){
		System.out.println("gia tri: "+listStudent.get(i));
	}
//	listStudent.clear();
//	for(int i=0;i<listStudent.size();i++){
//		System.out.println("gia tri: "+listStudent.get(i));
//	}
	listcopy.addAll(listStudent);
	for(int i=0;i<listcopy.size();i++){
		System.out.println("gia tri: "+listcopy.get(i));
	}
	if(listStudent.contains("le cong hau")){
		System.out.println("co");
	}
	listStudent.set(0, "le cong hau0");
	for(int i=0;i<listStudent.size();i++){
		System.out.println("gia tri: "+listStudent.get(i));
	}
//	listStudent.remove(0);
//	for(int i=0;i<listStudent.size();i++){
//		System.out.println("gia tri thu "+i+":" +listStudent.get(i));
//	}
//	Collections.sort(listStudent);
//	for(int i=0;i<listStudent.size();i++){
//		System.out.println("gia tri: "+listStudent.get(i));
//	}
	System.out.println(listStudent.indexOf("le cong hau3"));
	if(listStudent.isEmpty()){
		System.out.println("rong");
	}
}
}
